import React from 'react';
import {
  Form,
  Button,
  Drawer
} from 'antd';

import DescriptionList from '@/components/DescriptionList';
const { Description } = DescriptionList;
// 查看详情
const DescView = Form.create()(props => {
  const { lookDescView, handleLookDesc, selectedRows,repayment } = props;
  return (
    <Drawer
      width={640}
      destroyOnClose
      title={'查看还款信息'+"  (账户余额"+selectedRows.balance+")"}
      placement="right"
      visible={lookDescView}
      onClose={() => handleLookDesc(false, [])}>
      <DescriptionList size="large" style={{ marginBottom: 32 }} col="1">
        <Description term="账单金额">{selectedRows.amount}</Description>
        <Description term="本金">{selectedRows.principal}</Description>
        <Description term="利息">{selectedRows.interest}</Description>
        <Description term="平台服务费">{selectedRows.fee}</Description>
        <Description term="逾期服务费">{selectedRows.overdueServiceFee}</Description>
        <Description term="逾期利息">{selectedRows.overdueFee}</Description>
        {/*<Description term="状态">{repayStatus.map(item => (*/}
          {/*item.key === selectedRows.repayMode ? item.value : ''*/}
        {/*))}</Description>*/}
      </DescriptionList>
      <Button type="primary" onClick={repayment}>确定还款</Button>

    </Drawer>
  );
});

export default DescView;
